package com.calmcar.adas.dao;

import org.opencv.core.Point;

/**
 * Created by lelexiao on 2018/4/9.
 */

public class XYPoint {
    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public XYPoint(double x, double y) {
        this.x = x;
        this.y = y;
    }

    private double  x;
    private double  y;

    public Point getT() {
        return t;
    }

    public void setT(Point t) {
        this.t = t;
    }

    public Point getBr() {
        return br;
    }

    public void setBr(Point br) {
        this.br = br;
    }

    private Point t;
    private Point br;

    public XYPoint(double x, double y, Point t, Point br) {
        this.x = x;
        this.y = y;
        this.t = t;
        this.br = br;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj instanceof XYPoint){
           if(((XYPoint) obj).getX()==x && ((XYPoint) obj).getY()==y) {
               return true;
           }
        }
        return super.equals(obj);
    }
}
